package com.roadjava.demo02;

import com.roadjava.demo02.bean.UserInfo2;
import com.roadjava.demo02.util.ValidationUtil2;

import java.time.LocalDateTime;
import java.util.List;

public class ValidationTest2 {
    public static void main(String[] args) {
        UserInfo2 userInfo1 = new UserInfo2();
        userInfo1.setName("");
        userInfo1.setAge(1000);
        userInfo1.setEmail("123");
        userInfo1.setPhone("123");
        userInfo1.setBirthDay(LocalDateTime.now().plusDays(1));
        userInfo1.setPersonalPage("123");

        List<String> list1 = ValidationUtil2.valid(userInfo1);
        System.out.println(list1);

        UserInfo2 userInfo2 = new UserInfo2();
        userInfo2.setName("Tom");
        userInfo2.setAge(10);
        userInfo2.setEmail("123@qq.com");
        userInfo2.setPhone("18812341234");
        userInfo2.setBirthDay(LocalDateTime.now().minusDays(1));
        userInfo2.setPersonalPage("https://www.baidu.com");

        List<String> list2 = ValidationUtil2.valid(userInfo2);
        System.out.println(list2);
    }

}